package io.github.talelin.sleeve.controller.v1;


import io.github.talelin.sleeve.service.TagService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.PathVariable;
import io.github.talelin.sleeve.entity.Tag;


import javax.annotation.Resource;
import javax.validation.constraints.Min;
import javax.validation.constraints.Max;
import javax.validation.constraints.Positive;

import org.springframework.web.bind.annotation.RestController;

/**
* @author generator@london
* @since 2021-04-06
*/
@RestController
@RequestMapping("/v1/tag")
public class TagController {

    @Resource
    private TagService tagService;

    @GetMapping("/tagId/{id}")
    public Tag get(@PathVariable(value = "id") @Positive(message = "{id.positive}") Long id) {
        tagService.getById(id);
        return tagService.getById(id);
    }


}
